<style type="text/css">
.content{
    background: #f1f4f6;
}
body.is-dialog {
    background: #f1f4f6;
}
.box{
    padding-top: 15px;
    padding-bottom: 15px;
    border-top: 3px solid #ffffff;
}
.text_div{
    padding-top: 7px;
}
.plupload-preview li, .faupload-preview li{
     margin-top: 0px;
     margin-bottom: 0px;
}
.li_div{
    float: left;
}
.li_div_info{
    float: right;
    padding-left: 10px;
    padding-top: 17px;
}
</style>
<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
<div class="box">
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">任務ID:</label>
        <div class="col-xs-12 col-sm-8"><div class="text_div">{$row.id}</div>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">任務編號:</label>
        <div class="col-xs-12 col-sm-8"><div class="text_div">{$row.task_no}</div>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">創建時間:</label>
        <div class="col-xs-12 col-sm-8"><div class="text_div">{:$row.createtime?datetime($row.createtime):''}</div>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">任務狀態:</label>
        <div class="col-xs-12 col-sm-8"><div class="text_div">{$row['status_text']}</div>
        </div>
    </div>
    {if $row['status'] == 2}
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">完成時間:</label>
        <div class="col-xs-12 col-sm-8"><div class="text_div">{:$row.completiontime?datetime($row.completiontime):''}</div>
        </div>
    </div>
    {/if}
</div>
<div class="box">
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">用戶信息:</label>
        <div class="col-xs-12 col-sm-8">
            <ul class="row list-inline faupload-preview" id="p-images">
                {foreach name="users" item="vo"}
                <li class="li_div">
                    <div class="li_div">
                        <a href="{$vo.avatar}" target="_blank" class="thumbnail">
                            <img src="{$vo.avatar}" class="img-responsive">
                        </a>
                    </div>
                    <div class="li_div_info">
                        <div>{$vo.nickname}</div>
                        <div>{$vo.mobile}</div>
                    </div>
                </li>
                {/foreach}
            </ul>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">分配義工信息:</label>
        <div class="col-xs-12 col-sm-8">
            <ul class="row list-inline faupload-preview" id="p-images">
                {foreach name="volunteers" item="vo"}
                <li class="li_div">
                    <div class="li_div">
                        <a href="{$vo.avatar}" target="_blank" class="thumbnail">
                            <img src="{$vo.avatar}" class="img-responsive">
                        </a>
                    </div>
                    <div class="li_div_info">
                        <div>{$vo.name}</div>
                        <div>{$vo.mobile}</div>
                    </div>
                </li>
                {/foreach}
            </ul>
        </div>
    </div>
</div>

<div class="box">
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">上門地點:</label>
        <div class="col-xs-12 col-sm-8"><div class="text_div">{$province['name']}{$city['name']}{$district['name']}{$row.address}</div>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">上門時間:</label>
        <div class="col-xs-12 col-sm-8"><div class="text_div">{:$row.arrivaltime?datetime($row.arrivaltime):''}</div>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">電話回訪時間:</label>
        <div class="col-xs-12 col-sm-8"><div class="text_div">{:$row.returnvisittime?datetime($row.returnvisittime):''}</div>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">人數:</label>
        <div class="col-xs-12 col-sm-8"><div class="text_div">{$row.peoplenum}</div>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">積分獎勵:</label>
        <div class="col-xs-12 col-sm-8"><div class="text_div">{$row.score}</div>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">工時獎勵:</label>
        <div class="col-xs-12 col-sm-8"><div class="text_div">{$row.workinghours}</div>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">經驗獎勵:</label>
        <div class="col-xs-12 col-sm-8"><div class="text_div">{$row.exp}</div>
        </div>
    </div>
</div>
{foreach name="volunteers" item="vo"}
    <div class="box">
    <div class="panel-heading">義工任務信息</div>
        <div class="form-group">
            <label class="control-label col-xs-12 col-sm-2">義工信息:</label>
            <div class="col-xs-12 col-sm-8">
                <ul class="row list-inline faupload-preview" id="p-images">
                    <li class="li_div">
                        <div class="li_div">
                            <a href="{$vo.avatar}" target="_blank" class="thumbnail">
                                <img src="{$vo.avatar}" class="img-responsive">
                            </a>
                        </div>
                        <div class="li_div_info">
                            <div>{$vo.name}</div>
                            <div>{$vo.mobile}</div>
                        </div>
                    </li>
                </ul>
            </div>
        </div>
        <div class="form-group">
            <label class="control-label col-xs-12 col-sm-2">任務狀態:</label>
            <div class="col-xs-12 col-sm-8"><div class="text_div">{$vo.status_text}</div>
            </div>
        </div>
        {if $vo['order_receiving_time']>0}
        <div class="form-group">
            <label class="control-label col-xs-12 col-sm-2">領取時間:</label>
            <div class="col-xs-12 col-sm-8"><div class="text_div">{:$vo.order_receiving_time?datetime($vo.order_receiving_time):''}</div>
            </div>
        </div>
        {/if}
        {if $vo['completiontime']>0}
        <div class="form-group">
            <label class="control-label col-xs-12 col-sm-2">完成時間:</label>
            <div class="col-xs-12 col-sm-8"><div class="text_div">{:$vo.completiontime?datetime($vo.completiontime):''}</div>
            </div>
        </div>
        {/if}

        {if $vo['status'] == 2}
        <div class="form-group">
            <label class="control-label col-xs-12 col-sm-2">任務完成說明:</label>
            <div class="col-xs-12 col-sm-8"><div class="text_div">{$vo.content}</div>
            </div>
        </div>
        {/if}



        {if $vo['images']}
            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-2">上傳圖片:</label>
                <div class="col-xs-12 col-sm-8">
                    <ul class="row list-inline faupload-preview" id="p-images">
                        {foreach name="$vo['images']" item="voo"}
                        <li class="li_div">
                            <div class="li_div">
                                <a href="{:cdnurl($voo.images, true)}" target="_blank" class="thumbnail">
                                    <img src="{:cdnurl($voo.images, true)}" class="img-responsive">
                                </a>
                            </div>
                        </li>
                        {/foreach}
                    </ul>
                </div>
            </div>
    {/if}

    </div>
{/foreach}
</form>
